package com.example.mapper;


import com.example.pojo.dev.icDevPoint;
import com.example.pojo.dev.fmDevInfo;
import com.example.pojo.dev.fmRoominfo;
import com.example.pojo.mqtt.icPointVar;
import com.example.pojo.mqtt.icMqttConf;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @BelongsProject: parem-yunstiu
 * @BelongsPackage: com.yunsitu.mapper
 * @Author: dyz
 * @CreateTime: 10:52
 * @Version: 1.0
 */
@Repository
public interface PointEqipmentMapper {


    //去重 查询 type
    List<Object> typeDistinct(@Param("type") String type);

    List<String> selectPointNameListByPointName(@Param("pointName") String pointName);

    List<String> selectDistinctPointNameListByvariName(@Param("pointName") String pointName);

    List<icDevPoint> listPointEquipment();

    List<icPointVar> selectbyponitName(@Param("postalAddr") String postalAddr);

    String PointEquipmentbydbid(@Param("dbid") int dbid);

    //去重查询绑定的point
    List<String> PointDis();

    //查询设备绑定的变量
    List<String> variDis(@Param("devName") String devName,@Param("modelId") String modelId);
    List<String> aliasDisbydbid(@Param("dbid") String dbid,@Param("modelId") String modelId);
    List<String> variDisbydbid(@Param("dbid") String dbid,@Param("modelId") String modelId);
    //通过房间查询设备
    // List<fmDevInfo> deviceNamebyfloor(@Param("sname") String sname, @Param("modelId") String modelId);
    List<fmDevInfo> deviceNamebyfloor(@Param("sname") String sname, @Param("houseNumber") String  houseNumber, @Param("modelId") String modelId);
    //查找摄像头
    List<fmDevInfo> dbidbyfloor(@Param("dbid") String dbid, @Param("modelId") String modelId);

    //查询
    List<icDevPoint>  selectbydbid(@Param("dbid") String dbid, @Param("modelId") String modelId);

    //通过设备查找房间
    fmRoominfo selectfloorbydbid(@Param("dbid") int dbid, @Param("modelId") String modelId);

    //根据测点id 查询服务
    icMqttConf selectbyponit(@Param("pointid") int pointid);

    //

    List<icDevPoint> selectbySt1St2(@Param("st1name")String st1name, @Param("st2name")String st2name, @Param("keyword") String keyword);
    ///查询设备名
    List<icDevPoint> disNamedbId();

    List<icDevPoint> disName(@Param("keyword") String keyword);


    //查询绑定表唯一
    List<icDevPoint> selectVaridbymainrunVariable(@Param("dbid") int dbid);

    //查询设备绑定的测点
    List<String> dispointNamebyNumber(@Param("devName") String devName, @Param("devNumber") String devNumber);


    List<icDevPoint> bind(@Param("pointName") String pointName);


    List<icDevPoint> selectdevbyenvironment();


    List<String> disStorey();


    List<icDevPoint> selectbyStorey(@Param("level") String level, @Param("keyword") String keyword);

    List<icDevPoint> selectbyStoreyisnull( @Param("keyword") String keyword);

    List<fmDevInfo> listQiTiDevice();


    List<String> selectPointNameDistinctByDbid(String objectId, String modelId);

    List<icDevPoint> disvarname(String objectId, String modelId);
}
